The present invention relates to digital images. More specifically, the present invention relates to edge detection in blocks of digital images.
Compound documents may contain text, drawings and photo regions (sometimes overlaid), complex backgrounds (e.g., text boxes), watermarks and gradients. For example, magazines, journals and textbooks usually contain two or more of these features.
A single compression algorithm is usually not suitable for compressing compound documents. Compression algorithms such as JPEG are suitable for compressing photo regions of the compound color documents, but they are not suitable for not compressing text regions of the compound color documents and other regions containing edges. These lossy compression algorithms are based on linear transforms (e.g., discrete cosine transform, discrete wavelet transform) and do not compress edges efficiently. They require too many bits, and may produce very objectionable artifacts around text.
Compression algorithms such as CCITT, G4 and JBIG are suitable for compressing black and white text regions and other regions containing edges. However, compression algorithms such as CCITT, G4 and JBIG are not suitable for compressing photo regions.
A typical solution is to pre-process the documents, separating the regions according to the type of information they contain. For instance, regions containing edges (e.g., regions containing text, line-art, graphics) and regions containing natural features (e.g., regions containing photos, color backgrounds and gradients) are separated and compressed according to different algorithms.
However, algorithms for separating the regions tend to be very complex, requiring large amounts of memory and high bandwidth. The complexity, high bandwidth and large memory requirements make many algorithms unsuitable for embedded applications such as printers, scanners and other hardcopy devices.